#ifndef __OC_Osg2CesiumDef_H__
#define __OC_Osg2CesiumDef_H__

#if defined(_MSC_VER)
#ifndef OCOsg2Cesium_EXPORTS
#define _Osg2CesiumExport  __declspec(dllimport)
#else
#define _Osg2CesiumExport  __declspec(dllexport)
#endif
#else
#define _Osg2CesiumExport
#endif

#include "OCMain/StringConverter.h"
#include "json/json.h"

namespace OCPP
{
	namespace Cesium
	{
		enum BufferType
		{
			BT_POSITION_AND_NORMAL,
			BT_TEXTURE,
			BT_INDICE,
			BT_BATCHID
		};

		enum FeatureBatchType
		{
			FBT_B3DM,
			FBT_I3DM,
			FBT_PNTS,
		};

		class BaseWriter;
		class B3dmWriter;
		class BatchGeode;
		class BatchGroup;
		class CesiumTool;
		class CmptWriter;
		class FeatureBatchTable;
		class FeatureAttributeCallback;
		class I3dmWriter;
		class gltfObject;
		class gltfHelper;
		class DracoEncoder;
		class gltfConfig;
		class gltfOptions;
		class gltfMaterial;
		class PntsWriter;
		class TinyGltfDelegate;
		class TextureAtlasBuilder;
		class WebpEncoder;
		class ObliqueConverter;
		class BuildingAttributeCallback;
		class BuildingConverter;
		class glTFConverter;
		class glTFVisitor;
		class ObliqueConverter;

		class ObliqueAnalyst;
		class ObliqueConfig;
		class ObliqueTilingScheme;
		class ObliqueTile;
		class ObliqueTilingLevel;
		class ObliqueTilingBox;

		typedef std::function<void(const int&, const int&)> ProcessCallback;
		typedef std::function<void()> FinishedCallback;
		typedef std::function<void(const String&)>ProcessLogCallback;

		struct b3dmheader
		{
			char magic[4];
			unsigned int version;
			unsigned int byteLength;
			unsigned int featureTableJSONByteLength;
			unsigned int featureTableBinaryByteLength;
			unsigned int batchTableJSONByteLength;
			unsigned int batchTableBinaryByteLength;
		};

		struct i3dmheader
		{
			char magic[4];
			unsigned int version;
			unsigned int byteLength;
			unsigned int featureTableJSONByteLength;
			unsigned int featureTableBinaryByteLength;
			unsigned int batchTableJSONByteLength;
			unsigned int batchTableBinaryByteLength;
			unsigned int gltfFormat;
		};

		struct cmptheader
		{
			char magic[4];
			unsigned int version;
			unsigned int byteLength;
			unsigned int tilesLength;
		};

		typedef std::map<String, Json::Value> StringAttributeValues;
		typedef std::map<String, int> DracoAttributeMap;
	}

#define OC_NEW_Tiltset _OC_NewTileset
#define OC_WRITE_Tiltset(t,f) _OC_WriteTileset(t,f)
#define OC_Get_BoundingBox(n) getBoundBox(n)
#define TDTILES OCPP::Cesium
}

namespace draco
{
	class EncoderBuffer;
	class Mesh;
}

namespace tinygltf
{
	class Model;
	class Node;
	struct Buffer;
	struct BufferView;
}

#define Vec3ToVector3(v) OCPP::Vector3(v[0],v[1],v[2])

#endif